<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
class ReadTagger {
 
	public function readtagger(){
	
		$config['hostname'] = "gettagger.com";
		$config['username'] = "gettage_admin";
		$config['password'] = "Tagger123";
		$config['database'] = "gettage_tagger";
		$config['dbdriver'] = "mysqli";
 
		$config['port'] = 3306;
		$config['dbprefix'] = '';
		$config['pconnect'] = TRUE;
		//$config['db_debug'] = TRUE;
                $config['db_debug'] = FALSE;
		$config['cache_on'] = FALSE;
		$config['cachedir'] = '';
		$config['char_set'] = 'utf8';
		$config['dbcollat'] = 'utf8_general_ci';
		$config['swap_pre'] = '';
		//$config['autoinit'] = TRUE;
                $config['autoinit'] = FALSE;
		$config['stricton'] = FALSE;
		$config['ssl_set'] = true; 
		$config['ssl_key'] = NULL;
		$config['ssl_cert'] = NULL;
		$config['ssl_ca'] =  realpath('./application/third_party/mysql-ssl-ca-cert.pem');
		$config['ssl_capath'] = NULL;
		$config['ssl_cipher'] = NULL;
 
		$CI =& get_instance();
		$rr=$CI->load->database($config, TRUE);
        $connected = $rr->initialize();
		if(!$connected){
			$config['hostname'] = "gettagger.com";
			$rr=$CI->load->database($config, TRUE);
		}
                else{
                  $rr=$CI->load->database($config, TRUE);
                }
		$this->CI =& get_instance();
		$this->load=$rr;
	}
}